package 蓝桥杯天梯赛自测3月6号;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/*
 * 本题要求你计算A−B。不过麻烦的是，A和B都是字符串 —— 即从字符串A中把字符串B所包含的字符全删掉，剩下的字符组成的就是字符串A−B。
 * 输入在2行中先后给出字符串A和B。两字符串的长度都不超过，并且保证每个字符串都是由可见的ASCII码和空白字符组成，最后以换行符结束。
 * I love GPLT!  It's a fun game!
 * 在一行中打印出A−B的结果字符串。I lv GPLT!  It's  fn gm!
 */
public class AB5 {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String replace = br.readLine();
        StringBuilder stringBuilder = new StringBuilder();
        int[] ascii = new int[128];
        char[] chars1 = str.toCharArray();
        char[] chars = replace.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            ascii[chars[i]] = 1;
        }
        for (int i = 0; i < chars1.length; i++) {
            if (ascii[chars1[i]] != 1){
                stringBuilder.append(chars1[i]);
            }
        }
        System.out.println(stringBuilder.toString());
    }
}
